package person;

import java.io.Serializable;
import java.util.ArrayList;
public class Teacher extends PersonInfo implements Serializable {

/**
	 * 
	 */
	private static final long serialVersionUID = 5L;
private ArrayList <String> studySubject = new ArrayList <String> ();	

public Teacher (PersonInfo info){
	super.setFirstName(info.getFirstName());
	super.setSecondName(info.getSecondName());
	super.setPlaceOfBirth(info.getPlaceOfBirth());
	super.birth=info.getBirth();
}
public Teacher(){}
	public ArrayList <String> getStudySubjectList (){
		return studySubject;
	}
	
	public boolean addStudySubject (String subj){
		for (int i=0;i<studySubject.size();i++){
			if (studySubject.get(i).equals(subj)){
				return false;
			}
		}
		studySubject.add(subj);
		return true;
	}
	
}
